import 'package:flutter/material.dart';
import 'Util.dart';
import 'package:flutter_app/models/Girl.dart';

class Header2 extends StatelessWidget {
  final Girl girl;

  Header2({Key key, this.girl}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Card(
      child: Container(
        color: Colors.white,
        padding: EdgeInsets.all(10),
        child: Column(
          children: <Widget>[
            Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                Image.asset(
                  "images/ic_pay_zhonghang.png",
                  width: 20,
                  height: 20,
                ),
                Expanded(
                  child: Util().pd(Text("范特西"), l: 5),
                ),
                Text(
                  "Flutter/Dart",
                  style: TextStyle(color: Colors.grey),
                )
              ],
            ),
            Row(
              children: <Widget>[
                Expanded(
                  child: Column(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: <Widget>[
                      Text(
                        "天生我才必有用，千金散尽还复来" * 3,
                        maxLines: 2,
                        overflow: TextOverflow.ellipsis,
                        style: TextStyle(color: Colors.black, fontSize: 20),
                      ),
                      Text(
                        "与君歌一曲，请君为我倾耳听" * 4,
                        maxLines: 2,
                        overflow: TextOverflow.ellipsis,
                        style: TextStyle(color: Colors.grey, fontSize: 16),
                      )
                    ],
                  ),
                ),
                Image.network(
                  girl?.url ??
                      "https://ws1.sinaimg.cn/large/0065oQSqgy1fze94uew3jj30qo10cdka.jpg",
                  width: 100,
                  height: 100,
                )
              ],
            ),
            Row(
              mainAxisAlignment: MainAxisAlignment.start,
              crossAxisAlignment: CrossAxisAlignment.center,
              children: <Widget>[
                Icon(
                  Icons.local_airport,
                  size: 18,
                ),
                Text(
                  "100w",
                  style: TextStyle(color: Colors.grey),
                ),
                Util().pd(
                    Icon(
                      Icons.local_car_wash,
                      size: 18,
                    ),
                    l: 10),
                Text(
                  "200w",
                  style: TextStyle(color: Colors.grey),
                )
              ],
            )
          ],
        ),
      ),
    );
  }
}
